package com.jwell.panrank.ui.adapter

import android.support.v4.app.Fragment
import android.support.v4.app.FragmentManager
import android.support.v4.app.FragmentPagerAdapter


/**
 *fragment adapter
 */

class ViewpagerAdapter(fm: FragmentManager, private val fragmentList: MutableList<Fragment>, private val tabTitles: MutableList<String>) : FragmentPagerAdapter(fm) {

    init {
        fm.beginTransaction().commit()
    }

    override fun getItem(position: Int): Fragment {
        return fragmentList[position]
    }


    override fun getCount(): Int {
        return fragmentList.size
    }

    override fun getPageTitle(position: Int): CharSequence {
        return tabTitles[position]
    }
}
